package DB.dto;

import java.io.Serializable;

public class OperationDto implements Serializable
{
	/** 
	 * This attribute maps to the column ID_OPERATION in the OPERATION table.
	 */
	protected int idOperation;

	/** 
	 * This attribute maps to the column NAME in the OPERATION table.
	 */
	protected String name;

	/** 
	 * This attribute maps to the column ID_PRESCRIPTION in the OPERATION table.
	 */
	protected int idPrescription;

	/** 
	 * This attribute maps to the column DATEOFOPERATION in the OPERATION table.
	 */
	protected long dateofoperation;

	/** 
	 * This attribute represents whether the primitive attribute dateofoperation is null.
	 */
	protected boolean dateofoperationNull = true;

	/** 
	 * This attribute maps to the column CABINETNUMBER in the OPERATION table.
	 */
	protected int cabinetnumber;

	/**
	 * Method 'OperationDto'
	 * 
	 */
	public OperationDto()
	{
	}

	/**
	 * Method 'getIdOperation'
	 * 
	 * @return int
	 */
	public int getIdOperation()
	{
		return idOperation;
	}

	/**
	 * Method 'setIdOperation'
	 * 
	 * @param idOperation
	 */
	public void setIdOperation(int idOperation)
	{
		this.idOperation = idOperation;
	}

	/**
	 * Method 'getName'
	 * 
	 * @return String
	 */
	public String getName()
	{
		return name;
	}

	/**
	 * Method 'setName'
	 * 
	 * @param name
	 */
	public void setName(String name)
	{
		this.name = name;
	}

	/**
	 * Method 'getIdPrescription'
	 * 
	 * @return int
	 */
	public int getIdPrescription()
	{
		return idPrescription;
	}

	/**
	 * Method 'setIdPrescription'
	 * 
	 * @param idPrescription
	 */
	public void setIdPrescription(int idPrescription)
	{
		this.idPrescription = idPrescription;
	}

	/**
	 * Method 'getDateofoperation'
	 * 
	 * @return long
	 */
	public long getDateofoperation()
	{
		return dateofoperation;
	}

	/**
	 * Method 'setDateofoperation'
	 * 
	 * @param dateofoperation
	 */
	public void setDateofoperation(long dateofoperation)
	{
		this.dateofoperation = dateofoperation;
		this.dateofoperationNull = false;
	}

	/**
	 * Method 'setDateofoperationNull'
	 * 
	 * @param value
	 */
	public void setDateofoperationNull(boolean value)
	{
		this.dateofoperationNull = value;
	}

	/**
	 * Method 'isDateofoperationNull'
	 * 
	 * @return boolean
	 */
	public boolean isDateofoperationNull()
	{
		return dateofoperationNull;
	}

	/**
	 * Method 'getCabinetnumber'
	 * 
	 * @return int
	 */
	public int getCabinetnumber()
	{
		return cabinetnumber;
	}

	/**
	 * Method 'setCabinetnumber'
	 * 
	 * @param cabinetnumber
	 */
	public void setCabinetnumber(int cabinetnumber)
	{
		this.cabinetnumber = cabinetnumber;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof OperationDto)) {
			return false;
		}
		
		final OperationDto _cast = (OperationDto) _other;
		if (idOperation != _cast.idOperation) {
			return false;
		}
		
		if (name == null ? _cast.name != name : !name.equals( _cast.name )) {
			return false;
		}
		
		if (idPrescription != _cast.idPrescription) {
			return false;
		}

		if (dateofoperation != _cast.dateofoperation) {
			return false;
		}
		
		if (dateofoperationNull != _cast.dateofoperationNull) {
			return false;
		}
		
		if (cabinetnumber != _cast.cabinetnumber) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idOperation;
		if (name != null) {
			_hashCode = 29 * _hashCode + name.hashCode();
		}
		
		_hashCode = 29 * _hashCode + idPrescription;
		_hashCode = 29 * _hashCode + (int) (dateofoperation ^ (dateofoperation >>> 32));
		_hashCode = 29 * _hashCode + (dateofoperationNull ? 1 : 0);
		_hashCode = 29 * _hashCode + cabinetnumber;
		return _hashCode;
	}

    /**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "DB.dto.OperationDto: " );
		ret.append( "idOperation=" + idOperation );
		ret.append( ", name=" + name );
		ret.append( ", idPrescription=" + idPrescription );
		ret.append( ", dateofoperation=" + dateofoperation );
		ret.append( ", cabinetnumber=" + cabinetnumber );
		return ret.toString();
	}

}
